package com.gaofeng.day02;

import java.util.Random;

public class verifyCode {

    public static void main(String[] args) {
        char[] chs = new char[52];
        for (int i = 0; i < chs.length; i++) {
            if(i <= 25){
                chs[i] = (char)(97 + i);
            }else{
                chs[i] = (char)(65 + i - 26);
            }
        }

        for (int i = 0; i < chs.length; i++) {
//            System.out.print(chs[i] + "  ");
        }
        String result = "";
        Random rd = new Random();
        for (int i = 0; i < 4; i++) {
            int index =  rd.nextInt(chs.length);
            System.out.println(chs[index]);
            result += chs[index];
        }
        int num = rd.nextInt(10);
        result += num;
        System.out.println(result);

    }
}
